#pragma once

#include "qtbox2dabstractitem.h"

class QtBox2DCollideItem;

class QtBox2DCircleItem :
	public QtBox2DAbstractItem
{
	Q_OBJECT
	Q_PROPERTY(float mRadius READ getRadius WRITE setRadius)
public:
	QtBox2DCircleItem( QtBox2DScene* scene );
	virtual ~QtBox2DCircleItem(void);

	virtual void createPropertyWidget();
	virtual void createControllPoints();
	virtual void resetControllPoints();
	virtual QRectF boundingRect() const;
	virtual void createBody();
	virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
	float getRadius() { return mRadius; }

signals:
public slots:
	virtual void save(QDataStream &dataStream);
	virtual void load(QDataStream &dataStream);
	void setRadius(const float radius);
	void edgePoint(QtBox2DCollideItem*,const QPointF&);
private:
	float mRadius;
	QtVariantProperty* mRadiusProperty ;	
};
